package com.example.chat.config;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum StatusEnums {

    // 10未发布 20待审核 25 审核未通过 30已发布 40 违规下架

    NEED_NOT(10, "未发布"),
    LEVEL1_WAIT(20, "待审核"),
    LEVEL1_PASS(25, "审核未通过"),
    LEVEL1_FAIL(30, "已发布"),
    LEVEL1_RE(40, "违规下架"),
    ;


    private final int code;

    private final String message;

    public static String getMessage(int code) {
        for (StatusEnums c : StatusEnums.values()) {
            if (c.getCode() == code) {
                return c.getMessage();
            }
        }
        return "";
    }


}
